package com.yq.bean;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.HashMap;

public class Notification implements Serializable {
    private static final long serialVersionUID = 1L;
    private String service; // 表示业务层的类名（分模块使用反射调用方法）
    private String action; //表示请求操作
    private boolean flag; //表示操作是否成功
    private HashMap<String, Object> map; ///保存在通信中需要传输的信息

    public Notification(String service, String action, boolean flag, HashMap<String, Object> map) {
        this.service = service;
        this.action = action;
        this.flag = flag;
        this.map = map;
    }

    public Notification() {
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public HashMap<String, Object> getMap() {
        return map;
    }

    public void setMap(HashMap<String, Object> map) {
        this.map = map;
    }

    public String getService() {
        return service;
    }

    public void setService(String service) {
        this.service = service;
    }

    @Override
    public String toString() {
        return "Notification{" +
                "action='" + action + '\'' +
                ", flag=" + flag +
                ", map=" + map +
                '}';
    }
}